package utils

import (
	"github.com/bwmarrin/snowflake"
)

var _snowflakeNode *snowflake.Node

func init() {
	_snowflakeNode, _ = snowflake.NewNode(1)
}

func SnowflakeId() int64 {
	id := _snowflakeNode.Generate()
	return id.Int64()
}

func SnowflakeIdS() string {
	id := _snowflakeNode.Generate()
	return id.String()
}
